package mrdog.captor;

import jpcap.JpcapCaptor;

class PacketCaptor implements Runnable {

	private JpcapCaptor pcaptor = null;
	
	private int capnum = -1;
	
	private PacketPool pool = null;
	
	public PacketCaptor(PacketPool pool, JpcapCaptor pcaptor, int capnum) {
		this.pool = pool;
		this.pcaptor = pcaptor;
		this.capnum = capnum;
	}
	
	public void run() {
		pcaptor.loopPacket(capnum, new PacketListener(pool));
	}

}
